import Vue from 'vue';
import VueRouter from 'vue-router';
import indexRouter from './modules/index';
import factoryRouter from './modules/factory';
import userRouter from './modules/user';
import systemRouter from './modules/system';
import notFoundRouter from './modules/404';
import alarmRouter from './modules/alarm';
import deviceRouter from './modules/device';
import upgradeRouter from './modules/upgrade';
import roleRouter from './modules/role';
import organizationRouter from './modules/organization';
import applicationRouter from './modules/application';
import routerRouter from './modules/router';

Vue.use(VueRouter);

export default new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: factoryRouter
    .concat(deviceRouter, routerRouter, userRouter, roleRouter, organizationRouter, applicationRouter, systemRouter, alarmRouter, upgradeRouter)
    .concat(notFoundRouter)
});
